<template>
      <div class="qschool-main">
            <el-col :span="24">
                  <el-col :md="8" :xs="1" class="perchbox"></el-col>
                  <el-col :md="8" :xs="22">
                        <h4 class="transitionTextBg qschool-top">
                              Q校园一键报体温签到
                        </h4>
                        <el-col :span="24">
                              <el-col :span="8" class="content-left">
                                    <el-tooltip class="item" effect="dark" content="Q校园登录手机号" placement="top-start">
                                          <i class="el-icon-question"></i>
                                    </el-tooltip>
                                    手机号：
                              </el-col>
                              <el-col :span="16" class="content-right">
                                    <el-input v-model="username" placeholder="请输入手机号"></el-input>
                              </el-col>
                        </el-col>
                       <el-col :span="24">
                              <el-col :span="8" class="content-left">
                                    <el-tooltip class="item" effect="dark" content="Q校园登录密码" placement="top-start">
                                          <i class="el-icon-question"></i>
                                    </el-tooltip>
                                    密码：
                              </el-col>
                              <el-col :span="16" class="content-right">
                                    <el-input v-model="password" placeholder="请输入密码"></el-input>
                              </el-col>
                        </el-col>
                        <el-col :span="24" class="qschool-bottom">
                              <el-button type="primary" round size="medium" style="padding:12px 50px;" @click.native="submit">晋源区一键上报</el-button>
                              <el-button type="warning" round size="medium" style="padding:12px 50px;" @click.native="quit">返回主页</el-button>
                        </el-col>
                  </el-col>
                  <el-col :md="8" :xs="1" class="perchbox"></el-col>
            </el-col>
      </div>
</template>

<script>
export default {
      props: [],
      data() {
            return {
                  username:'',
                  password:'',
                  param:{
                        "cItem": [
                        {
                              "cDescription": "家庭详细地址",
                              "cEnabled": 1,
                              "cKey": "家庭详细地址",
                              "cMust": 1,
                              "cOrder": 1,
                              "cValue": "5024",
                              "sValue": "晋源区"
                        },
                        {
                              "cDescription": "系统自动定位获取",
                              "cEnabled": 1,
                              "cKey": "当日位置签到",
                              "cMust": 1,
                              "cOrder": 1,
                              "cValue": "5012",
                              "sValue": "山西省太原市晋源区金胜镇圣湖观澜国际(圣湖万年花城东)"
                        },
                        {
                              "cDescription": "单选：是/否",
                              "cEnabled": 1,
                              "cKey": "近14天是否有海外旅居史",
                              "cMust": 1,
                              "cOrder": 2,
                              "cValue": "5025",
                              "sValue": "2"
                        },
                        {
                              "cDescription": "海外旅居地",
                              "cEnabled": 1,
                              "cKey": "海外旅居地",
                              "cMust": 1,
                              "cOrder": 3,
                              "cValue": "5026"
                        },
                        {
                              "cDescription": "单选：是/否",
                              "cEnabled": 1,
                              "cKey": "今日是否为确诊或疑似病例",
                              "cMust": 1,
                              "cOrder": 4,
                              "cValue": "5022",
                              "sValue": "2"
                        },
                        {
                              "cDescription": "单选：是/否",
                              "cEnabled": 1,
                              "cKey": "今日家庭成员是否为确诊或疑似病例",
                              "cMust": 1,
                              "cOrder": 5,
                              "cValue": "5023",
                              "sValue": "2"
                        },
                        {
                              "cDescription": "今日体温",
                              "cEnabled": 0,
                              "cKey": "今日体温",
                              "cMust": 0,
                              "cOrder": 6,
                              "cValue": "5014"
                        },
                        {
                              "cDescription": "请填写晨检体温",
                              "cEnabled": 1,
                              "cKey": "晨检体温",
                              "cMust": 1,
                              "cOrder": 7,
                              "cValue": "5001",
                              "sValue": "36.5"
                        },
                        {
                              "cDescription": "请填写午检体温",
                              "cEnabled": 0,
                              "cKey": "午检体温",
                              "cMust": 0,
                              "cOrder": 8,
                              "cValue": "5002",
                              "sValue": ""
                        },
                        {
                              "cDescription": "填写晚检体温",
                              "cEnabled": 1,
                              "cKey": "晚检体温",
                              "cMust": 0,
                              "cOrder": 9,
                              "cValue": "5021",
                              "sValue": "36.5"
                        },
                        {
                              "cDescription": "单选：是/否",
                              "cEnabled": 1,
                              "cKey": "今日是否有发热、乏力、干咳等症状",
                              "cMust": 1,
                              "cOrder": 10,
                              "cValue": "5003",
                              "sValue": "2"
                        },
                        {
                              "cDescription": "单选：是/否",
                              "cEnabled": 1,
                              "cKey": "今日共同居住成员是否有发热、乏力、干咳等症状",
                              "cMust": 1,
                              "cOrder": 11,
                              "cValue": "5009",
                              "sValue": "2"
                        },
                        {
                              "cDescription": "单选：是/否",
                              "cEnabled": 1,
                              "cKey": "今日是否前往疫区或与疫区相关人员有接触",
                              "cMust": 1,
                              "cOrder": 12,
                              "cValue": "5007",
                              "sValue": "2"
                        },
                        {
                              "cDescription": "单选：是/否",
                              "cEnabled": 1,
                              "cKey": "今日是否接触过疑似或确诊病例人员",
                              "cMust": 1,
                              "cOrder": 13,
                              "cValue": "5008",
                              "sValue": "2"
                        },
                        {
                              "cDescription": "单选：假期地居住/在校居住/返程地居住/出行目的地居住",
                              "cEnabled": 1,
                              "cKey": "今日居住位置类别",
                              "cMust": 1,
                              "cOrder": 14,
                              "cValue": "5011",
                              "sValue": "3"
                        },
                        {
                              "cDescription": "今日居住小区（村）是否有疫情",
                              "cEnabled": 1,
                              "cKey": "今日居住小区（村）是否有疫情",
                              "cMust": 1,
                              "cOrder": 15,
                              "cValue": "5013",
                              "sValue": "2"
                        },
                        {
                              "cDescription": "今日所在地是否为高风险地区",
                              "cEnabled": 1,
                              "cKey": "今日所在地是否为高风险地区",
                              "cMust": 1,
                              "cOrder": 17,
                              "cValue": "5027",
                              "sValue": "2"
                        },
                        {
                              "cDescription": "居住地-省",
                              "cEnabled": 1,
                              "cKey": "居住地-省",
                              "cMust": 1,
                              "cOrder": 18,
                              "cValue": "5015"
                        },
                        {
                              "cDescription": "居住地-市",
                              "cEnabled": 1,
                              "cKey": "居住地-市",
                              "cMust": 1,
                              "cOrder": 19,
                              "cValue": "5016"
                        },
                        {
                              "cDescription": "居住地-县",
                              "cEnabled": 1,
                              "cKey": "居住地-县",
                              "cMust": 1,
                              "cOrder": 20,
                              "cValue": "5017",
                              "sValue": "140110"
                        },
                        {
                              "cDescription": "居住地详细地址",
                              "cEnabled": 1,
                              "cKey": "居住地详细信息",
                              "cMust": 1,
                              "cOrder": 21,
                              "cValue": "5018",
                              "sValue": "圣湖观澜国际小区"
                        },
                        {
                              "cDescription": "经度",
                              "cEnabled": 1,
                              "cKey": "经度",
                              "cMust": 1,
                              "cOrder": 22,
                              "cValue": "5019",
                              "sValue": "112.516975"
                        },
                        {
                              "cDescription": "纬度",
                              "cEnabled": 1,
                              "cKey": "纬度",
                              "cMust": 1,
                              "cOrder": 23,
                              "cValue": "5020",
                              "sValue": "37.79124"
                        }
                        ],
                        "sid": 317079,
                        "uvCode": 135380,
                        "mcode": "dayUp"
                        }
            }
      },
      methods:{
            submit(){
                  const that=this;
                  if(that.username!='13133334468'){
                        that.$message({
                              type: 'info',
                              message: "目前只支持博主本人一键签到",
                        });
                        return;
                  }
                  that.$axios({
                        method: 'get',
                        url: that.$url+'/api/index/QsignIn'
                  }).then(res=>{
                        that.$message({
                              type: 'info',
                              message: res.data.status.message,
                        });
                  }).catch(function () {
                        that.$message({
                              type: 'error',
                              message: "操作失败，请联系管理员",
                        });
                  })
            },
            quit(){
                  this.$router.push('/index')
            }
      }
};
</script>

<style lang="less" scope>
      .qschool-main{
            text-align: center;
      }
      .qschool-top{
            padding-bottom: 80px;
            padding-top: 20px;
      }
      .content-left{
            text-align: right;
            line-height: 50px;
            i{
                  cursor:help;
            }
      }
      .content-right{
            text-align: left;
            line-height: 50px;
            width: 64%;
      }
      .qschool-bottom{
            padding: 20px 0;
      }
</style>